<template>
  <div class="container">
    <h2>学校名称:{{ name }}</h2>
    <h2>学校地址:{{ address }}</h2>
    <button @click="showName">点我提示学校名</button>
    <student></student>
  </div>
</template>

<script>
import Student from "./Student.vue";

export default {
  name: "School",
  data() {
    return {
      name: "chongyou",
      address: "南山",
    };
  },
  methods: {
    showName() {
      alert(this.name);
    },
  },
  components: { Student },
};
</script>

<style scoped lang="css">
.container {
  background-color: orange;
}
</style>
